home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 February / Gamestar_81_2006-02_dvd.iso / Red Shark / Common / Animations.script < prev    next >
Text File  |  2001-09-10  |  2KB  |  64 lines

  1. //-------------------------------------------------------------------
  2. //
  3. //  This code is copyright 2001 by G5 Software.
  4. //  Any unauthorized usage, either in part or in whole of this code
  5. //  is strictly prohibited. Violators WILL be prosecuted to the
  6. //  maximum extent allowed by law.
  7. //
  8. //-------------------------------------------------------------------
  9.  
  10. class CMissionStartAnimation
  11. {
  12.   matrix m_Placement = matrix(
  13.                                 -0.073588, -0.997289, 0.000000, 11920.122070,
  14.                                  0.997289, -0.073588, 0.000000, 1977.507080,
  15.                                  0.000000,  0.000000, 1.000000, 222.721466,
  16.                                  0.000000,  0.000000, 0.000000, 1.000000
  17.                                );
  18.  
  19.   void CMissionStartAnimation()
  20.   {
  21.   }
  22.  
  23.   void OnPlayFrame(
  24.       int   iFrame,
  25.       float fTime
  26.     )
  27.   {
  28.     if (0 == iFrame)
  29.     {
  30. //      Core_CallFunction(SOID_GameController, "EnableControl", "", false);
  31.       SetFrameDuration(1.0);
  32.     }
  33.     else
  34.     if ((1 <= iFrame) && (iFrame < 4))
  35.     {
  36.       CreateEffect("EFFECTID_TimeJumpSplashRingEffect", m_Placement);
  37.       SetFrameDuration(3.0 - float(iFrame - 1));
  38.     }
  39.     else
  40.     if ((4 <= iFrame) && (iFrame < 8))
  41.     {
  42.       CreateEffect("EFFECTID_TimeJumpSplashRingEffect", m_Placement);
  43.       SetFrameDuration(1.0 / (2.0 + float(iFrame - 4)));
  44.     }
  45.     else
  46.     if (8 == iFrame)
  47.     {
  48.       CreateEffect("EFFECTID_TimeJumpEffect", m_Placement);
  49.       SetFrameDuration(1.0);
  50.     }
  51.     else
  52.     {
  53.       Stop();
  54. //      Core_CallFunction(SOID_GameController, "EnableControl", "Helicopter", true);
  55.     }
  56.   }
  57.  
  58.   void OnMissionLoaded()
  59.   {
  60.     Play();
  61.   }
  62. }
  63.  
  64.